package com.example.module_service.adapter

import androidx.databinding.DataBindingUtil


import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.lib_common.view.entity.PatrolsBeanItem
import com.example.module_service.R
import com.example.module_service.databinding.ItemLocationBinding

class PatrolLocationAdapter :BaseQuickAdapter<PatrolsBeanItem,BaseViewHolder>(R.layout.item_location){

    lateinit var binding: ItemLocationBinding

    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemLocationBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: PatrolsBeanItem) {
        binding = DataBindingUtil.getBinding<ItemLocationBinding>(helper.itemView)!!
        binding.bean=item
    }
}